<template>
    <div class="flex_col_center w100 h100 bk" style="justify-content: space-evenly;">
        <el-button @click="onClickRoom" type="primary" style="width: 50%;">进入国投小课堂投票</el-button>
        <el-button @click="onClickDebate" type="primary" style="width: 50%; margin-left: 0px;">进入辩论赛投票</el-button>
    </div>
</template>

<script lang="ts" setup>
import router from '@/router';
import { online } from '@/service/api';
import { run } from '@/utils/ui';


async function onClickRoom() {
    await run(async () => {
        await online();
        await router.push('/room');
    });
}

async function onClickDebate() {
    await run(async () => {
        await online();
        await router.push('/debate');
    });
}

</script>
